/*
题目地址:https://leetcode-cn.com/problems/palindrome-number/
题目标签:数学
*/

class Solution {
   public:
    bool isPalindrome(int x) {
        int y = x;
        long z = 0;
        while (y > 0) {
            z = z * 10 + y % 10;
            y /= 10;
        }
        return x == z;
    }
};